import re
# ^ 开始 $ 结尾
# msg = input('msg:')
# result = re.search('^he\w*lo$', msg)
# if result:
#     print('ok')
# else:
#     print('no')


# 匹配手机号
phone = input('手机号:')
# \d = [0-9]
if re.search('^1[3-9]\d{9}$', phone):
    print('手机号合法')
else:
    print('不合法')
